"""
created  by  hzwlxy  at 2018/7/11 10:17
__author__: 西瓜哥
__QQ__ : 120235331
__Note__： 
"""
from flask import render_template
from flask_login_multi import login_required

__author__ = '西瓜哥'

from app.web import admin_app as app


@app.route('/menu', methods=['GET'])
@login_required
def menu_index():
    return render_template('admin/menu/index.html')


@app.route('/menu/lists', methods=['GET'])
@login_required
def menu_lists():
    return 'menu.lists'


@app.route('/menu/create', methods=['GET'])
@login_required
def menu_create():
    return 'menu.create'


@app.route('/menu', methods=['POST'])
@login_required
def menu_store():
    return 'menu.save'


@app.route('/menu/<int:id>/edit', methods=['GET'])
@login_required
def menu_edit(id):
    return 'menu.edit'


@app.route('/menu/<int:id>', methods=['PUT'])
@login_required
def menu_update(id):
    return 'menu.update'


@app.route('/menu/<int:id>', methods=['DELETE'])
@login_required
def menu_delete(id):
    return 'menu.delete'
